Loop through the baselines of a baselineSet

Hello. Here is a description of my problem. I keep a set of Doors modules for a number of drivers and after each release, I apply a baselineSet on all the Doors modules of the drivers included in that release.

What I need is to loop over all baselines in a given baselineSet. So for a given baselineSet that I know, I should do something like:

baseline b
baselineSet bs
 
for all b in bs do
{
}

I have 2 problems:

1. I did not find this type of iteration in the dxl manual so I am not sure if I can loop a baseline inside a baselineSet.

2. For the baselineSet I need to loop, I have it's major, minor and suffix, but I don't know how to get a reference to it. The only function that I have found is 'BaselineSet baselineSet(ModuleVersion modver)' which does not help me.
 

Any help will be much appreciated. Thank you


Mogg - Wed Sep 10 10:34:37 EDT 2014

Re: Loop through the baselines of a baselineSet
Mogg - Thu Sep 11 05:53:03 EDT 2014

After spending a some time looking better in the Doors DXL RM, I found a solution to my problem. Here is the script I wrote. It should be run having as current folder the parent folder of the drivers modules:

void printBaselines()
{
    BaselineSetDefinition bsd
    BaselineSet           bs
    ModuleVersion        modver    

    int bsMajor = 1
    int bsMinor = 0
    string strBsSuffix = "BASELINE NAME"

         
    for bsd in current Folder do
    {
        print name(bsd) ": " description(bsd) ""
        for bs in bsd do
        {
            if(major(bs) == bsMajor && minor(bs) == bsMinor && suffix(bs) == strBsSuffix)         
            {
                for modver in bs do
                {
                    print "\n" versionString(modver)
                }
            }
        }
    }
}

printBaselines()